import axios from "axios";
//角色列表
let role = (params) => axios.get('/role/list', { params });
//添加
let add = (data) => axios.post('/role', data);
//更新
let update = (id, data) => axios.put(`/role/${id}`, data);
let remove = (id) => axios.delete(`/role/${id}`);
// 侧边栏菜单
let menu = (params) => axios.get('/role/menu/', { params });
// 设置菜单
let setMenu = (data) => axios.post('/role/menu', data);

export default {
    role, add, update, remove, setMenu, menu
}